 CREATE EXTERNAL TABLE jms_ods.yl_lmdm_sys_staff_extend(
id                   bigint     comment "主键"             --NUMBER(11)
,remark              string     comment "备注"             --CLOB
,staff_id            bigint     comment "员工id"           --NUMBER(11)
,create_by           bigint     comment "创建人ID"         --NUMBER(11)
,update_by           bigint     comment "最后更新人ID"     --NUMBER(11)
,create_by_name      string     comment "创建人名称"       --NVARCHAR2(50)
,update_by_name      string     comment "最后修改人名称"   --NVARCHAR2(50)
,create_time         timestamp  comment "创建时间"         --DATE
,update_time         timestamp  comment "更新时间"         --DATE
,is_enable           tinyint    comment "是否启用:1启用,2不启用"     --NUMBER(2)
,is_delete           tinyint    comment "是否删除:1未删除,2已删除"   --NUMBER(2)
,version             string     comment "版本号"                     --NVARCHAR2(10)
,sort                tinyint    comment "排序"                       --NUMBER(2)
,extend_update_time  timestamp  comment "网点经营员工更新时间"       --DATE
,hr_department_id    bigint     comment "hr部门id"                   --NUMBER(20)
,hr_department_code  string     comment "hr部门编码"                 --NVARCHAR2(60)
,hr_department_name  string     comment "hr部门名称"                 --NVARCHAR2(60)
,hr_post_id          bigint     comment "hr岗位id"                   --NUMBER(20)
,hr_post_code        string     comment "hr岗位编码"                 --NVARCHAR2(30)
,hr_post_name        string     comment "hr岗位名称"                 --NVARCHAR2(60)
,data_sources        string     comment "数据来源"                   --NVARCHAR2(20)
,attributes          tinyint    comment "员工属性1,待派 2,落地配，0其他"   --NUMBER(2)
,cn_id               bigint     comment "菜鸟id"    --NUMBER(11)
   )
 COMMENT '员工扩展表'
 PARTITIONED BY (
   `dt` string COMMENT '更新/创建日期 (yyyy-MM-dd)')
 ROW FORMAT SERDE
   'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
 STORED AS INPUTFORMAT
   'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
 OUTPUTFORMAT
   'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
 LOCATION
   '/dw/hive/jms_ods.db/external/yl_lmdm_sys_staff_extend' ;